package mysql

import "gorm.io/gorm"

type Fang struct {
	gorm.Model
	Name    string  `gorm:"type:varchar(50);not null;comment:'姓名'"`
	Address string  `gorm:"type:varchar(50);not null;comment:'地区'"`
	Price   float64 `gorm:"type:decimal(10,2);not null;comment:'价格'"`
}

func (f *Fang) ZuShow(db *gorm.DB, id int64) error {
	return db.Debug().Where("id = ?", id).First(f).Error
}
